import http from '@/utils/request'
export default {
  import: {
    save: {
      url: 'api/',
      name: '导入-保存',
      post: async function (url, data) {
        return await http.post(this.url + url, data)
      }
    }
  },
  file: {
    downFile: {
      url: `api/file/down-file`,
      name: '文件下载',
      down: async function (params) {
        return await http.down(this.url, {}, 
        {headers: {
            'Content-Type': 'application/json;charset=UTF-8',
            exportFlag: '1',
            channelCode: 'C01'
          },method: 'get',params: params}
        )
      }
    },
    deleteFile: {
      url: `api/file/delete-file`,
      name: '文件删除',
      get: async function (param) {
        return await http.get(this.url, param)
      }
    },
    batchDeleteFiles: {
      url: `api/file/batch-delete-files`,
      name: '文件批量删除',
      post: async function (param) {
        return await http.post(this.url, param)
      }
    }
  },
}